/*
 * AnimeGuide - Anime collection manager for KDE 4
 *
 * Copyright (c) 2009 - 2011 Norbert Chromek <norbert.chromek@gmail.com>
 *
 * AnimeGuide is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * AnimeGuide is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with AnimeGuide.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <gui/mainwindow.h>

#include <KAboutData>
#include <KApplication>
#include <KCmdLineArgs>
#include <KLocale>

static const char description[] = I18N_NOOP("Anime collection manager for KDE 4");

static const char version[] = "0.2.0";

int main(int argc, char **argv) {
	KAboutData about(
		"animeguide",
		"animeguide",
		ki18n("AnimeGuide"),
		version,
		ki18n(description),
		KAboutData::License_GPL_V3,
		ki18n("(C) 2009 - 2011 Norbert Chromek"),
		KLocalizedString(),
		"https://code.google.com/p/animeguide/");
	about.addAuthor(ki18n("Norbert Chromek"),
		KLocalizedString(),
		"norbert.chromek@gmail.com");
	about.setCustomAuthorText(
		ki18n("Please report bugs on https://code.google.com/p/animeguide/issues/list"),
		ki18n("Please report bugs on <a href=\"https://code.google.com/p/animeguide/issues/list\"> AnimeGuide`s Source Forge bugtracker</a>."));
	about.setTranslator(ki18nc("NAME OF TRANSLATORS", "Your names"),
		ki18nc("EMAIL OF TRANSLATORS", "Your emails"));

	KCmdLineArgs::init(argc, argv, &about);
	KApplication app;

	if (app.isSessionRestored()) {
		RESTORE(MainWindow());
	} else {
		MainWindow * mainWindow = new MainWindow();
		mainWindow->show();
	}

	return app.exec();
}